﻿using System.ComponentModel;
using Bing.Utils.Extensions;

namespace Bing.Biz.Enums
{
    /// <summary>
    /// 民族
    /// </summary>
    public enum Nation
    {
        /// <summary>
        /// 汉族        
        /// </summary>
        [Description("汉族")]
        Hz = 0,
        /// <summary>
        /// 蒙古族        
        /// </summary>
        [Description("蒙古族")]
        Mgz = 1,
        /// <summary>
        /// 回族        
        /// </summary>
        [Description("回族")]
        HuiZ = 2,
        /// <summary>
        /// 藏族        
        /// </summary>
        [Description("藏族")]
        Zz = 3,
        /// <summary>
        /// 维吾尔族        
        /// </summary>
        [Description("维吾尔族")]
        Wwez = 4,
        /// <summary>
        /// 苗族        
        /// </summary>
        [Description("苗族")]
        Mz = 5,
        /// <summary>
        /// 彝族        
        /// </summary>
        [Description("彝族")]
        Yz = 6,
        /// <summary>
        /// 壮族        
        /// </summary>
        [Description("壮族")]
        ZhuangZ = 7,
        /// <summary>
        /// 布依族        
        /// </summary>
        [Description("布依族")]
        Byz = 8,
        /// <summary>
        /// 朝鲜族        
        /// </summary>
        [Description("朝鲜族")]
        Cxz = 9,
        /// <summary>
        /// 满族        
        /// </summary>
        [Description("满族")]
        ManZ = 10,
        /// <summary>
        /// 侗族        
        /// </summary>
        [Description("侗族")]
        Tz = 11,
        /// <summary>
        /// 瑶族        
        /// </summary>
        [Description("瑶族")]
        YaoZ = 12,
        /// <summary>
        /// 白族        
        /// </summary>
        [Description("白族")]
        Bz = 13,//baizu
        /// <summary>
        /// 土家族        
        /// </summary>
        [Description("土家族")]
        Tjz = 14,
        /// <summary>
        /// 哈尼族        
        /// </summary>
        [Description("哈尼族")]
        Hnz = 15,
        /// <summary>
        /// 哈萨克族        
        /// </summary>
        [Description("哈萨克族")]
        Hskz = 16,
        /// <summary>
        /// 傣族        
        /// </summary>
        [Description("傣族")]
        Dz = 17,
        /// <summary>
        /// 黎族        
        /// </summary>
        [Description("黎族")]
        Lz = 18,
        /// <summary>
        /// 傈僳族        
        /// </summary>
        [Description("傈僳族")]
        Lsz = 19,
        /// <summary>
        /// 佤族        
        /// </summary>
        [Description("佤族")]
        Wz = 20,
        /// <summary>
        /// 畲族        
        /// </summary>
        [Description("畲族")]
        Sz = 21,
        /// <summary>
        /// 高山族        
        /// </summary>
        [Description("高山族")]
        Gsz = 22,
        /// <summary>
        /// 拉祜族        
        /// </summary>
        [Description("拉祜族")]
        Lhz = 23,
        /// <summary>
        /// 水族        
        /// </summary>
        [Description("水族")]
        ShuiZ = 24,
        /// <summary>
        /// 东乡族        
        /// </summary>
        [Description("东乡族")]
        Dxz = 25,
        /// <summary>
        /// 纳西族        
        /// </summary>
        [Description("纳西族")]
        Nxz = 26,
        /// <summary>
        /// 景颇族        
        /// </summary>
        [Description("景颇族")]
        Jpz = 27,
        /// <summary>
        /// 柯尔克孜族        
        /// </summary>
        [Description("柯尔克孜族")]
        Kekzz = 28,
        /// <summary>
        /// 土族        
        /// </summary>
        [Description("土族")]
        TuZ = 29,
        /// <summary>
        /// 达斡尔族        
        /// </summary>
        [Description("达斡尔族")]
        Dwez = 30,
        /// <summary>
        /// 仫佬族        
        /// </summary>
        [Description("仫佬族")]
        Mlz = 31,
        /// <summary>
        /// 羌族        
        /// </summary>
        [Description("羌族")]
        Qz = 32,
        /// <summary>
        /// 布朗族        
        /// </summary>
        [Description("布朗族")]
        Blz = 33,
        /// <summary>
        /// 撒拉族        
        /// </summary>
        [Description("撒拉族")]
        Slz = 34,
        /// <summary>
        /// 毛南族        
        /// </summary>
        [Description("毛南族")]
        Mnz = 35,
        /// <summary>
        /// 仡佬族        
        /// </summary>
        [Description("仡佬族")]
        Ylz = 36,
        /// <summary>
        /// 锡伯族        
        /// </summary>
        [Description("锡伯族")]
        Xbz = 37,
        /// <summary>
        /// 阿昌族        
        /// </summary>
        [Description("阿昌族")]
        Acz = 38,
        /// <summary>
        /// 普米族        
        /// </summary>
        [Description("普米族")]
        Pmz = 39,
        /// <summary>
        /// 塔吉克族        
        /// </summary>
        [Description("塔吉克族")]
        Tjkz = 40,
        /// <summary>
        /// 怒族        
        /// </summary>
        [Description("怒族")]
        Nz = 41,
        /// <summary>
        /// 乌孜别克族        
        /// </summary>
        [Description("乌孜别克族")]
        Wzbkz = 42,
        /// <summary>
        /// 俄罗斯族        
        /// </summary>
        [Description("俄罗斯族")]
        Elsz = 43,
        /// <summary>
        /// 鄂温克族        
        /// </summary>
        [Description("鄂温克族")]
        Ewkz = 44,
        /// <summary>
        /// 德昂族        
        /// </summary>
        [Description("德昂族")]
        Daz = 45,
        /// <summary>
        /// 保安族        
        /// </summary>
        [Description("保安族")]
        Baz = 46,
        /// <summary>
        /// 裕固族        
        /// </summary>
        [Description("裕固族")]
        Ygz = 47,
        /// <summary>
        /// 京族        
        /// </summary>
        [Description("京族")]
        Jz = 48,
        /// <summary>
        /// 塔塔尔族        
        /// </summary>
        [Description("塔塔尔族")]
        Ttrz = 49,
        /// <summary>
        /// 独龙族        
        /// </summary>
        [Description("独龙族")]
        Dlz = 50,
        /// <summary>
        /// 鄂伦春族        
        /// </summary>
        [Description("鄂伦春族")]
        Elcz = 51,
        /// <summary>
        /// 赫哲族        
        /// </summary>
        [Description("赫哲族")]
        Hzz = 52,
        /// <summary>
        /// 门巴族        
        /// </summary>
        [Description("门巴族")]
        Mbz = 53,
        /// <summary>
        /// 珞巴族        
        /// </summary>
        [Description("珞巴族")]
        Lbz = 54,
        /// <summary>
        /// 基诺族        
        /// </summary>
        [Description("基诺族")]
        Jnz = 55
    }

    /// <summary>
    /// 民族枚举扩展
    /// </summary>
    public static class NationExtensions
    {
        /// <summary>
        /// 获取描述
        /// </summary>
        /// <param name="nation">民族</param>
        /// <returns></returns>
        public static string Description(this Nation? nation)
        {
            return nation == null ? string.Empty : nation.Value.Description();
        }

        /// <summary>
        /// 获取值
        /// </summary>
        /// <param name="nation">民族</param>
        /// <returns></returns>
        public static int? Value(this Nation? nation)
        {
            return nation?.Value();
        }
    }
}
